package com.galen.manual.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.Max;

@Data
@Schema(description = "任务查询条件")
public class TaskQueryDTO {

    @Schema(description = "任务编号")
    private String taskNumber;

    @Schema(description = "用户ID")
    private Long userId;

    @Schema(description = "产品ID")
    private Long productId;

    @Schema(description = "任务状态 1:已领取 2:待审核 3:已完成 4:已驳回 5:已回收")
    private String status;

    @Schema(description = "开始时间 yyyy-MM-dd HH:mm:ss")
    private String startTime;

    @Schema(description = "结束时间 yyyy-MM-dd HH:mm:ss")
    private String endTime;

    @Min(value = 1, message = "页码必须大于0")
    @Schema(description = "页码", defaultValue = "1")
    private Integer pageNum = 1;

    @Min(value = 1, message = "每页数量必须大于0")
    @Max(value = 100, message = "每页数量不能超过100")
    @Schema(description = "每页数量", defaultValue = "10")
    private Integer pageSize = 10;
}